Understand partial knowledge of relationships

Understand partial knowledge of relationships

In some situations it is possible to draw valid conclusions where attributes or relationships used in a rule have an unknown value, as enough information is known to still make a decision.

Partially complete relationships are those for which some, but not all of the targets are known. Because all the targets are not known, such a relationship is marked as unknown. Both inferred and static relationships can be partially known.

What do you want to do?

Understand how partial knowledge reasoning works

Make a partially known relationship known in the debugger

Understand how partial knowledge reasoning works

Partial knowledge of inferred relationships

An inferred relationship will be partially known if the rule used to infer it returns unknown for some, but not all, of the potential target entity instances. Take the following example rule where 'the customer' entity has a many-to-many relationship ('the customer's triple A products') to 'the product' entity.

the product is a member of the customer's triple A products if

the product's rating = "AAA"

 

If we have the following entity instances:

then when the above rule is evaluated to infer customer0's "the customer's triple A products" relationship, the rule will return true for product0, false for product1, and unknown for product2. Hence product0 is a target of the relationship, and product1 is not a target of the relationship. product2 on the other hand may or may not be part of the relationship - this cannot be determined until its rating is provided.

Therefore customer0's "the customer's triple A products" relationship is partially known, with one known target (product0), and one known "not target" (product1).

Entity completion status and inferred relationships

An inferred relationship can also be partially known because the target entity is not complete. This is because more target entity instances may yet be added, and some of these may satisfy the inferred relationship's membership rule.

For more information, refer to the topic Understand containment relationships and entity completion.

Partially known inferred relationships in the debugger

The screenshot below shows how a partially known inferred relationship is displayed in the debugger:

 

 

Here the relationship 'the child's favorite pets' is being examined for the child Will. The relationship editor is showing that:

A tri-state checkbox is used in the relationship editor. It is important to understand the meaning of each state of the checkbox:

Partial knowledge of static relationships

When a relationship is set, the rule engine automatically sets the reverse relationship. In the case of many-to-one and many-to-many relationships, this can result in the reverse relationship being partially known. Take the following example:

 

 

Here we have:

If d2's owner is set to be p2 (the solid black line), then the rule engine will set p2's dogs automatically. It is known that d2 is one of the person's dogs (the solid red line). There is no information about d1 and d3 however; the dog's owner is unknown for both of these entity instances. Hence it is not known whether d1 or d3 are member's of p2's dogs - they may or may not be, hence they are represented with a red dotted line.

This leads to a situation of partial knowledge. For p2, the person's dogs is a partially known relationship. There is one known target, d2, and d1 and d3 may or may not be members of the relationship.

In the same way, setting many-to-many relationships can lead to a partially known reverse relationship.

NOTE: The rule engine does not currently determine "not targets" for partially known static relationships. A partially known static relationship can currently only consist of known targets, and entity instances that may or may not be members of the relationship.

Static relationships and entity completion status

Take the following example:

 

 

Here:

If the entity the dog is "not complete" (ie not all instances of the entity have potentially been collected), then despite all the available dogs being known targets, we still have a partial knowledge situation. This is because extra dogs could be created, which may or may not be members of the relationship. On the other hand, if the entity the dog is "complete" (ie all the instances of the entity are known to have been collected), then this cannot occur, and the engine will determine that the person's dogs is a fully known relationship for p2.

Partially known static relationships in the debugger

Partially known static (ie non-inferred) relationships are displayed in the debugger in a similar fashion to inferred relationships, as seen below:

 

 

Here the relationship 'the child's pets' is being examined for the child Sam. The relationship editor is showing that:

 

Note that unlike for inferred relationships, only two states are shown when displaying a partially known static relationship in the debugger:

 

This is because the rule engine does not support "not targets" for static relationships.

Make a partially known relationship known in the debugger

Make a partially known inferred relationship known in the debugger

To make an inferred relationship known in the debugger you need to investigate the relationship. To do this:

  1. In the Data view, select the inferred relationship that you want to investigate. (TIP: Inferred relationships are shown by a yellow multi-cube icon.)
  2. In the right hand pane, click the Investigate button.



  3. The Decision view will be shown with any relevant unknown attributes or relationships highlighted.



    (If any unknown containment relationships are highlighted, right-click and choose Edit Relationship, to go to the relationship editor in the Data view. Complete the relationship by adding entity instances or using the Containment Complete option on the relationship in the Data view, then return to the Decision view.)

    Double-click any unknown attributes to set values for them. The Decision view will then update to show which attributes contributed to this conclusion.



  4. You can also switch back to the Data view to see which entity instances, if any, have been inferred as target instances of this relationship.

 

Make a partially known static relationship known in the debugger

Unlike partially known inferred relationships in the debugger, partially known static relationships can be directly set to being known. To do this:

  1. In the Data view, select the static relationship in the left hand pane. (TIP: Static relationships are shown by a multi-coloured cube icon.) This will display any existing entity instances in the relationship editor in the right hand pane.



  2. In the right hand pane, select the Known option. NOTE: Any entity instances which may or may not have been targets of that relationship (the checkboxes with the green square) will now be set as not being targets of the relationship. (In this example, the pet Spot was a known target and remains this way. The pets Patch, Kitty and Fido on the other hand, may or may not have been targets and are now marked as not being targets of the relationship.)



  3. Select the check box for any existing entity instances that you want to associate with that relationship.